// import com.alibaba.druid.sql.ast.SQLExpr;
// import com.alibaba.druid.sql.ast.SQLName;
// import com.alibaba.druid.sql.ast.statement.SQLAlterStatement;
// import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;

#include "MySqlAlterServerStatement.h"
#include "../../../../ast/SQLExpr.h"
#include "../../../../ast/SQLName.h"
#include "../../visitor/MySqlASTVisitor.h"

SQLName_ptr MySqlAlterServerStatement::getName()
{
  return name;
}

void MySqlAlterServerStatement::setName(SQLName_ptr name)
{
  if (name != nullptr)
  {
    name->setParent(SharedObject(MySqlAlterServerStatement));
  }
  this->name = name;
}

SQLExpr_ptr MySqlAlterServerStatement::getUser()
{
  return user;
}

void MySqlAlterServerStatement::setUser(SQLExpr_ptr user)
{
  if (user != nullptr)
  {
    user->setParent(SharedObject(MySqlAlterServerStatement));
  }
  this->user = user;
}

void MySqlAlterServerStatement::accept0(MySqlASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(MySqlAlterServerStatement)))
  {
    acceptChild(visitor, name);
    acceptChild(visitor, user);
  }
  visitor->endVisit(SharedObject(MySqlAlterServerStatement));
}
